<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>订单管理</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<link rel="stylesheet" href="/hyqcss/public.css">
	<style type="text/css">
		body{
			background: #e9e9e9;
		}
		/*公共头部带搜索*/
		.public_container{
			margin: 20px;
			background: #fff;
		}
		.public_title_container{
			height: 54px;
			padding: 0 20px;
			font-size: 14px;
			display: flex;
			align-items: center;
			background: #f9f9f9;
			border-bottom: 1px solid #f0f0f0;
		}
		.public_title_container a{
			margin-right: 30px;
			height: 54px;
			line-height: 54px;
			cursor: pointer;
		}
		.public_title_active{
			color: #1E9FFF;
			border-bottom: 1px solid #1E9FFF;
		}
		.public_buttonSearch_container{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20px;
			background: #fff;
		}
		.public_buttonSearch_container a{
			color: #fff;
			background-color: #2f54eb;
			text-shadow: 0 -1px 0 rgba(0,0,0,.12);
			height: 24px;
			padding: 4px 15px;
			font-size: 14px;
			border-radius: 2px;
			display: flex;
			align-items: center;
			cursor: pointer;
		}
		.public_Search_container{
			position: relative;
		}
		.public_Search_container input{
			width: 240px;
			height: 32px;
			border: 1px solid #d9d9d9;
		}
		.public_Search_container i{
			position: absolute;
			bottom: 6px;
			right: 10px;
			cursor: pointer;
		}
		/*公共头部带搜索 end*/


		.public_tip_container{
			margin: 20px;
		}
	</style>
</head>
<body>
	<div class="public_tip_container">
		<span class="layui-btn layui-btn-primary" onclick="copyToClip('{$toolbarUrl}')">复制工具栏URL</span>
	</div>
	<div class="public_container">
		<!-- /*公共头部带搜索*/ -->
		<div class="public_content">
			<div class="public_title_container">
				<a href="javascript::viod(0)" class="public_title_active">订单列表</a>
				<a href="javascript::viod(0)">小程序订单配置</a>
			</div>
		</div>
		<form class="layui-form">
			<div class="public_table_container">
				<table class="layui-table" lay-skin="line">
					<thead>
						<tr>
							<th>订单号</th>
							<th>客户名称</th>
							<th>客户手机号</th>
							<th>订单状态</th>
							<th>支付时间</th>
							<th>商品名称/数量</th>
							<th>商品价格</th>
						</tr> 
					</thead>
					<tbody>
						{loop $order as $orders}
						<tr>
							<td>{$orders->order_number}</td>
							<td>{$orders->externalcontact_name}</td>
							<td>{$orders->externalcontact_mobile}</td>
							<td>{if $orders->order_status==1}订单关闭{else}商家已关闭{/if}</td>
							<td>{if $orders->pay_times}{$orders->pay_times}{else} {/if}</td>
							<td>{$orders->product_name}*{$orders->product_num}</td>
							<td>{$orders->product_price}</td>
						</tr>
						{/loop}
					</tbody>
				</table>
			</div>
		</form>
		<!-- 公共表格部分 end-->
	</div>
	<script src="/cdn/jquery.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/js/ajax.js"></script>
	<script type="text/javascript">
		// 弹窗
		layui.use('layer', function(){
			var layer = layui.layer;
		}); 
		// 表单
		layui.use('form', function(){
			var form = layui.form;

		  //监听提交
		  form.on('submit(formDemo)', function(data){
		  	layer.msg(JSON.stringify(data.field));
		  	return false;
		  });
		});
	</script>
	<script type="text/javascript">
		$(".public_title_container a").click(function(e){
			if($(this).hasClass('active')) return;
			location.href = 'order_config.html';
		})

		function copyToClip(content, message) {
			var aux = document.createElement("input"); 
			aux.setAttribute("value", content); 
			document.body.appendChild(aux); 
			aux.select();
			document.execCommand("copy"); 
			document.body.removeChild(aux);
			if (message == null) {
				layer.msg("复制成功");
			} else{
				layer.msg(message);
			}
		}
	</script>
</body>
</html>